const { globSync } = require("glob");
const { readFileSync, writeFileSync } = require("node:fs");

const newContent = {}
const files = globSync('script/en/*.json')
files.forEach(file => {
  const content = JSON.parse(readFileSync(file, 'utf8'))
  Object.keys(content).forEach(key => {
    newContent[key] = content[key]
  })
})

writeFileSync('locales/en.json', JSON.stringify(newContent, null, 2))
